﻿using System;
using System.Data.Common;

namespace Gaea
{
    internal partial class GaeaConnectionProvider : IGaeaConnectionProvider
    {
        public DbConnection GetConnection(GaeaOption gaeaOption)
        {
            var dbConnetion = Activator.CreateInstance(gaeaOption.TypeOfDbConnection) as DbConnection;
            dbConnetion.ConnectionString = gaeaOption.ConnectionString;
            dbConnetion.Open();
            return dbConnetion;
        }
    }
}
